package com.siboxuetang.need.util;

public class TimeUtils {
    public static boolean isOver60m(Long timestamp) {
        //这里传参为Long主要防止拆箱后产生空指针问题
        if (timestamp != null) {
            long now = System.currentTimeMillis();
            return (now - timestamp) / 1000 > 60;
        }else {
            return true;
        }

    }

    public static boolean isOver180m(Long timestamp) {
        //这里传参为Long主要防止拆箱后产生空指针问题
        if (timestamp != null) {
            long now = System.currentTimeMillis();
            return (now - timestamp) / 1000 > 180;
        }else {
            return true;
        }

    }


}
